Xbasic

helper::GoogleSheetAppendSheetJSON Method

Syntax

AppendSheetJSON as L(sheetname as C,values as C[, columnNames as C[, range as C]])

Arguments

sheetnameCharacter

Name of sheet to append row content to.

valuesCharacter

JSON of the form of an array of objects where the names match the names in the first row of the spreadsheet.

columnNamesCharacter

Optional column names (If we don't want to depend on the names being in the sheet).

rangeCharacter

 

Returns

resultLogical

Optional range (if we don't want to append to the entire sheet).

Description

Append cells in first available empty space in sheet. Values are specified as JSON array of objects

Example

dim gs as helper::GoogleSheet
gs.namedresource= "<namedresource>"
gs.spreadsheet= "<spreadsheetid>"
gs.AppendSheetJSON("customers",<<%JSON%
[
   { 
     "firstname":"billy",
     "lastname":"kid" 
   }
]
%JSON%)